package com.xiaoxiaoxt.xiaoxiaoxtdao.mapper;

import com.xiaoxiaoxt.xiaoxiaoxtdao.entity.Group;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GroupMapper {
    int deleteByPrimaryKey(Integer groupid);

    int insert(Group record);

    int insertSelective(Group record);

    Group selectByPrimaryKey(Integer groupid);

    int updateByPrimaryKeySelective(Group record);

    int updateByPrimaryKey(Group record);

    Group selectByMid(@Param("mid") Integer mid);

    @Select(" select g.groupid,g.groupname,g.grade,g.groupNo,groupStr from dede_groups g,dede_group_user gu where g.groupid = gu.gid and gu.uid = #{mid,jdbcType=INTEGER}")
    List<Group> selectListByMid(@Param("mid") Integer mid);
}